﻿// Deep Earth is a community project available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warranty – Use at your own risk
// View the project and the latest code at http://DeepEarth.codeplex.com/

using System.ComponentModel;

namespace DeepEarth.Client.MapControl
{
    /// <summary>
    /// <para>
    /// A simple Compass style navigation direction enum 
    /// Useful for panning controls
    /// </para>
    /// </summary>
    [DefaultValue(North)]
    public enum Direction
    {
        /// <summary>
        /// Bearing 0 or 360 Degrees
        /// </summary>
        North,

        /// <summary>
        /// Bearing 45 Degrees
        /// </summary>
        NorthEast,

        /// <summary>
        /// Bearing 315 Degrees
        /// </summary>
        NorthWest,

        /// <summary>
        /// Bearing 180 Degrees
        /// </summary>
        South,

        /// <summary>
        /// Bearing 135 Degrees
        /// </summary>
        SouthEast,

        /// <summary>
        /// Bearing 225 Degrees
        /// </summary>
        SouthWest,

        /// <summary>
        /// Bearing 90 Degrees
        /// </summary>
        East,

        /// <summary>
        /// Bearing 270 Degrees
        /// </summary>
        West
    }


    /// <summary>
    /// Standard Units of Measure
    /// </summary>
    [DefaultValue(Meter)]
    public enum Unit
    {
        /// <summary>
        /// 2.54 centimeters
        /// </summary>
        Inch,

        /// <summary>
        /// statute mile, 1,609.344 meters
        /// </summary>
        Mile,

        /// <summary>
        /// distance travelled by light in free space in 1/299,792,458 of a second ;)
        /// </summary>
        Meter,

        /// <summary>
        /// 1000 meters
        /// </summary>
        Kilometer
    }


    /// <summary>
    /// The possible options when you click and drag your mouse over the map
    /// </summary>
    [DefaultValue(Pan)]
    public enum DragBehavior
    {
        /// <summary>
        /// The Map will essentially stick to your mouse and move where you drag it to.
        /// </summary>
        Pan,

        /// <summary>
        /// Draw a Marque Selection Box over the map, and zoom in when mouse released.
        /// </summary>
        Select,

        /// <summary>
        /// Draw a Shape on the map, you don't pan the map when you want to draw shapes
        /// </summary>
        Draw

        ///// <summary>
        ///// Draw a Shape on the map, you don't pan the map when you want to draw shapes
        ///// </summary>
        //Line,

        ///// <summary>
        ///// Draw a Shape on the map, you don't pan the map when you want to draw shapes
        ///// </summary>
        //Polygon
    }


    ///<summary>
    /// Enumeration of the currently supported update modes for plotting geometries on the canvas.
    ///</summary>
    [DefaultValue(ElementUpdate)]
    public enum UpdateModes
    {
        ///<summary>
        /// Iterates through all GeometryBase objects on the GeometryLayer Canvas and performs 
        /// and explicit update of each Geographic Point to a Pixel.  
        /// Best option for lots of Points because no scaling is involved and you get updates during zooms.
        ///</summary>
        ElementUpdate,
        ///<summary>
        /// Offsets the Canvas in synch with teh the map as the viewport changes and hides the shapes during zooms.  
        /// Shapes locations are only updated on the map when zoom is complete.
        ///</summary>
        PanOnlyUpdate,
        ///<summary>
        /// Pans and scales the GeometryLayer Canvas in synch with the full map extent.  
        /// It sets the items on the Canvas once and the scaling and offsetting of the Canvas do the rest. 
        ///</summary>
        TransformUpdate
    }
}